import Vue from 'vue'
import App from './App.vue'
import {initRouter} from './router'
import './theme/index.less'
import Antd from 'ant-design-vue'
import Viser from 'viser-vue'
import '@/mock'
import store from './store'
import 'animate.css/source/animate.css'
import Plugins from '@/plugins'
import {initI18n} from '@/utils/i18n'
import bootstrap from '@/bootstrap'
import {http} from '@/services/http'
import '@/directives/index'
import BaiduMap from 'vue-baidu-map'
import VeRing from 'v-charts/lib/ring.common'

Vue.component(VeRing.name, VeRing)
import message from '@/components/message/index'
Vue.use(message)

// 引入常量
import sysConst  from '@/utils/sys_const'
Vue.prototype.FORM_ACTION = sysConst.FORM_ACTION;
const router = initRouter(store.state.setting.asyncRoutes)
const i18n = initI18n('CN', 'US')
bootstrap({router, store, i18n})

Vue.prototype.$http = http
Vue.config.productionTip = false
Vue.use(Viser)
Vue.use(Antd)
Vue.use(Plugins)
Vue.use(BaiduMap, {
  ak: ''
})

//富文本编辑器
import  VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
const BASE_URL = 'http://8.140.160.222:8888'  //生产环境
//const BASE_URL = 'http://172.16.0.116:8888'   //本地
Vue.prototype.$baseUrl = BASE_URL
Vue.use(VueQuillEditor)

new Vue({
  router,
  store,
  i18n,
  render: h => h(App),
}).$mount('#app')
